home *** CD-ROM | disk | FTP | other *** search
- #!/bin/sh -e
- # This script can be called in the following ways:
- #
- # After the package was installed:
- # <postinst> configure <old-version>
- #
- #
- # If prerm fails during upgrade or fails on failed upgrade:
- # <old-postinst> abort-upgrade <new-version>
- #
- # If prerm fails during deconfiguration of a package:
- # <postinst> abort-deconfigure in-favour <new-package> <version>
- # removing <old-package> <version>
- #
- # If prerm fails during replacement due to conflict:
- # <postinst> abort-remove in-favour <new-package> <version>
-
-
- # Remove old lists
- rm_old_lists()
- {
- rm -f /etc/readahead/readahead /etc/readahead/readahead.new
- }
-
- # Remove existing rc symlinks
- rm_rc_symlinks()
- {
- update-rc.d -f readahead remove
- }
-
-
- case "$1" in
- configure)
- if dpkg --compare-versions "$2" lt "1:0.20050517.0220-0ubuntu1"; then
- rm_rc_symlinks
- fi
- ;;
-
- abort-upgrade|abort-deconfigure|abort-remove)
- ;;
-
- *)
- echo "$0 called with unknown argument \`$1'" 1>&2
- exit 1
- ;;
- esac
-
- # Automatically added by dh_installinit
- if [ -x "/etc/init.d/readahead" ]; then
- update-rc.d readahead start 01 S . >/dev/null || exit $?
- fi
- # End automatically added section
- # Automatically added by dh_installinit
- if [ -x "/etc/init.d/readahead-desktop" ]; then
- update-rc.d readahead-desktop start 39 S . >/dev/null || exit $?
- fi
- # End automatically added section
- # Automatically added by dh_installinit
- if [ -x "/etc/init.d/stop-readahead" ]; then
- update-rc.d stop-readahead start 99 2 . >/dev/null || exit $?
- fi
- # End automatically added section
-
- exit 0
-